<!-- Modal -->
<div class="modal fade" id="dialog-delete" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="true"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">提示</h4>
        </div>
        <div class="modal-body clearfix">
            <div class='col-sm-1 text-center'><i class='fa fa-exclamation-circle text-size-32 blue'></i></div>
            <div class='col-sm-11 breakall'><p>删除后您将无法恢复，请谨慎操作</p><p class='text-muted'>您确认要删除吗？</p></div>
        </div>
        <div class="modal-footer">
            <a class="btn btn-primary btn-modal-ok-delete" data-method="DELETE">确定</a>
        	<button class="btn btn-default btn-modal-cancel btn-modal-close" data-dismiss="modal">取消</button>
        </div>
    </div>
  </div>
</div>
<!-- Modal End -->
<!-- Modal -->
<div class="modal fade" id="dialog-tip" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="true"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">提示</h4>
        </div>
        <div class="modal-body clearfix">
            <div class='col-sm-1 text-center'><i class='fa fa-exclamation-circle text-size-32 color-orange'></i></div>
            <div class='col-sm-11 breakall'><p class="modal-tip-text">请选择需要操作的内容。</p></div>
        </div>
        <div class="modal-footer">
          <button class="btn btn-primary" data-dismiss="modal">确定</button>
        </div>
    </div>
  </div>
</div>
<!-- Modal End -->
<!-- Modal -->
<div class="modal fade dialog-form-class" id="dialog-form" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="true"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">提示</h4>
        </div>
        <div class="modal-body clearfix">
            
        </div>
        <div class="modal-footer">
            <a class="btn btn-primary btn-modal-ok">确定</a>
            <button class="btn btn-default btn-modal-cancel btn-modal-close" data-dismiss="modal">取消</button>
        </div>
    </div>
  </div>
</div>
<!-- Modal End -->
<script>
    $('body').on('click', '.btn-modal-ok-delete', function() {
        var url = this.href;
        $.ajax({
           type: "DELETE",
           dataType: 'json',
           url: url,
           success: function(data) {
                location.reload();
           }
        });
        
        return false;
    });
    $('.dialog-form-class').on('click', '.btn-modal-ok', function() {
        $(this).parents('.modal').find('form').submit();
        return false;
    });
</script>